<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>style绑定数组</title>
</head>

<body>
    <h1>style绑定数组</h1>
    <div>
        <a href="/">回目录</a>
    </div>
    <hr>
    <div id="app">
        <div :style="[baseStyle, overrideStyle]"> Hello Vue！</div>
    </div>
    <script src="/node_modules/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el: "#app",
            data: {
                baseStyle: {
                    color: "blue",
                    margin: "4px",
                },
                overrideStyle: {
                    color: "red",
                    fontSize: "22px",
                },
            }
        });
    </script>
</body>

</html>